.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center.pt-3.pb-2.mb-3.border-bottom
  %h1.h2 Report Name: #{@report.report_name}

%form{ :method => "post" }
  - if @user_variables
    - i = 0
    - w = 66
    - @user_variables.each do | variables_name, variables_data|
      .striped-rows
        .form-group.row
          %label.col-lg-2.col-form-label{ :for => "variable_name_#{w}_" } Variable Name:
          .col-lg-4.striped-col
            %input.form-control{ :id => "variable_name_#{w}_", :type => "text", :name =>"variable_name_#{w}_", :value => "#{variables_name}" }
        .form-group.row
          %label.col-lg-2.col-form-label{ :for => "variable_data_#{w}_" } Variable data:
          .col-lg-4.striped-col
            %textarea.form-control{ :id => "variable_data_#{w}_", :name => "variable_data_#{w}_" }
              #{variables_data}
        %br
        - w = w + 1
  %h2.h5 Add user defined variables
  .striped-rows
    .form-group.row
      %label.col-lg-2.col-form-label{ :for => "variable_name_#{i}_" } Variable Name:
      .col-lg-4.striped-col
        %input.form-control{ :id => "variable_name_#{i}_", :type => "text", :name =>"variable_name_#{i}_" }
    .form-group.row
      %label.col-lg-2.col-form-label{ :for => "variable_data_#{i}_" } Variable data:
      .col-lg-4.striped-col
        %textarea.form-control{ :id => "variable_data_#{i}_", :rows => "10", :name => "variable_data_#{i}_" }
    %br
    - i = i + 1

  %input.btn.btn-primary{ :type => "submit", :value => "Save" }
  %a.btn.btn-secondary{ :href => "/report/#{@report.id}/additional_features" }
    Cancel
